import os
path=r'E:\zhujinchao\uterus\celltrain'
for i in os.listdir(path):
    c=os.path.join(path,i)
    c1=c+'\\'+'trian'
    d=c+'\\'+'train'
    os.rename(c1,d)